home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / src / source.zoo / pladv.c < prev    next >
C/C++ Source or Header  |  1989-05-15  |  757b  |  35 lines

  1. /* Advance to subpage "page", or to the next one if "page" = 0 */
  2.  
  3. #include "plplot.h"
  4.  
  5. void pladv(page)
  6. int page;
  7. {
  8.       int cursub, nsubx, nsuby;
  9.       int device, termin, graphx;
  10.  
  11.       int level;
  12.       glev(&level);
  13.       if (level < 1) fatal("Please call PLSTAR before calling PLADV.");
  14.       
  15.       gdev(&device,&termin,&graphx);
  16.       gsub(&nsubx,&nsuby,&cursub);
  17.       if (page > 0 && page <= nsubx*nsuby) 
  18.         cursub = page;
  19.       else if (page == 0) {
  20.         if (cursub == nsubx*nsuby) {
  21.           if (termin != 0) beepw();
  22.           plclr();
  23.           cursub = 1;
  24.         }
  25.         else
  26.           cursub = cursub + 1;
  27.       }
  28.       else
  29.         fatal("Invalid subpage number in PLADV.");
  30.  
  31.       ssub(nsubx,nsuby,cursub);
  32.       setsub();
  33. }
  34.  
  35.